import { Map } from "immutable";
import * as types from "./constants";
const initState = Map({
    currentArea: 7,
    currentType: {
        name: "华语男歌手",
        type: 1
    },
    artistList: []
});

function reducer(state = initState, actions) {
    switch (actions.type) {
        case types.CHANGE_ARTIST_LIST:
            return state.set("artistList", actions.artistList);
        case types.CHANGE_CURRENT_TYPE:
            return state.set("currentType", actions.currentType);
        case types.CHANGE_CURRENT_AREA:
            return state.set("currentArea", actions.currentArea);
        default:
            return state;
    }
}
export default reducer;